

import java.io.File;
import java.io.FileWriter;

public class Logger {
	static final String filePath = "log.txt";
	static final boolean canLog = true;

	public synchronized static boolean log(String message) {
		FileWriter out = null;
		try {
			out = new FileWriter(new File(filePath), true);
			out.append(message + "\r\n");
		} catch (Exception e) {
			return false;
		} finally {
			try {
				if (out != null)
					out.close();
			} catch (Exception e2) {
				return false;
			}
		}
		return true;
	}
}
